using Azure.Web.Models;

using Xunit;

namespace Azure.Tests.Web.ViewModels
{
    public class PostViewModelFacts
    {
        [Fact]
        public void PostViewModelIsProperlyConstructed()
        {
            var post = Test.Post;

            var postViewModel = new PostViewModel(post);

            Assert.NotNull(postViewModel);
            Assert.Equal(post.Author, postViewModel.Author);
            Assert.Equal(post.Body, postViewModel.Body);
            Assert.Equal(post.Title, postViewModel.Title);
            Assert.Equal(post.Created, postViewModel.Created);
        }
    }
}